package com.heima.wemedia.controller.v1;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.pojos.ApUser;
import com.heima.wemedia.service.WmUserService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequiredArgsConstructor
public class WmUserController {
    private final WmUserService wmUserService;
    /**
     * 在自媒体用户表中插入用户id和密码
     */
    @PostMapping("user/update")
    ResponseResult updateUser(@RequestBody ApUser apUser) {
        return wmUserService.updateUser(apUser);
    }
}